/**
 * 1 成功
 * 2
 * 3 其他
 */
export const showToastMethod = (data, config) => {
  let c = ''
  if (config === '1') {
    c = 'success'
  } else if (config === '2') {
    c = 'loading'
  } else if (config === '3') {
    c = 'none'
  }
  uni.showToast({
    title: data,
    mask: true,
    duration: 2000,
    icon: c
  });
};
export const navigateToPage = (url) => {
  uni.navigateTo({
    url: url
  })
};
export const backPage = (url) => {
  uni.navigateBack({
    url: url
  })
}
export const switchTabPage = (url) => {
  uni.switchTab({
    url: url
  })
}
export const reLaunchPage = (url) => {
  uni.reLaunch({
    url: url
  })
}
export const redirectToPage = (url) => {
  uni.redirectTo({
    url: url
  })
}
export const loadingPage = (data, b) => {
  uni.showLoading({
    title: data,
    mask: b || true
  });
}
